﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using BlogMVC.ModelEntity;

namespace BlogMVC.Controllers
{
    public class HomeController : Controller
    {
        //
        // GET: /Home/
        DataBaseDataContext db = new DataBaseDataContext();

        public ActionResult Index()
        {
         
            return View();
        }
        public ActionResult TakeCategory(int id)
        {
            var list = db.Articles.Where(u => u.CategoryId == id).ToList();
            ViewBag.li = list;
            ViewBag.time = DateTime.Now;
            return View();
        }
        public ActionResult Detail()
        {
            return View();
        }
    }
}
